public class Triagle extends Shapes {
    private double a;
    private double b;
    private double c;
    public Triagle(){}

    public Triagle(double a, double b, double c) {
        this.a = a;
        this.b = b;
        this.c = c;
    }

    public double getA() {
        return a;
    }

    public void setA(double a) {
        this.a = a;
    }

    public double getB() {
        return b;
    }

    public void setB(double b) {
        this.b = b;
    }

    public double getC() {
        return c;
    }

    public void setC(double c) {
        this.c = c;
    }
    public void area() {
        double p=(a+b+c)/2;
        System.out.println("三角形面积是"+Math.sqrt(p*(p-a)*(p-b)*(p-c)));
    }
    public  void c(){
        System.out.println("三角形周长是"+(a+b+c));
    }
}
